<template>

  <el-button type="primary" style="margin-left: 16px" @click="drawer2 = true">
    with footer
  </el-button>

  <el-drawer v-model="drawer2" :direction="direction">
    <template #header>
      <h4>消息列表</h4>
    </template>
    <template #default>
      <div>
        <el-radio v-model="radio1" label="全部" size="large"
          >全部</el-radio
        >
        <el-radio v-model="radio1" label="未读" size="large"
          >未读</el-radio
        >
      </div>
    </template>
    <template #footer>
      <div style="flex: auto">
        <el-button @click="cancelClick">关闭</el-button>
        <el-button type="primary" @click="confirmClick">确定</el-button>
      </div>
    </template>
  </el-drawer>
</template>

<script lang="ts" setup>
import { ref,defineEmits,defineProps } from 'vue'
import { ElMessageBox } from 'element-plus'

const drawer2 = ref(false)
const direction = ref('rtl')
const radio1 = ref('全部')
function cancelClick() {
  drawer2.value = false
}
function confirmClick() {
  // ElMessageBox.confirm(`Are you confirm to chose ${radio1.value} ?`)
  //   .then(() => {
  //     drawer2.value = false
  //   })
  //   .catch(() => {
  //     // catch error
  //   })
}
</script>
